<?php
// +----------------------------------------------------------------------
// | Azthink通用开发平台 [ TOMORROW IS ANOTHER DAY ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018-2019 http://www.azthink.top All rights reserved.
// +----------------------------------------------------------------------
// | Author 李忠<azthink@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\controller;

use app\admin\model\File as FileModel;

/**
 * 附件控制器
 *
 * @author 李忠<azthink@qq.com>
 * @createAt 2018-09-12 16:08:42
 *
 */
class Attachment extends Admin {

    /**
     * 列表页面
     */
    public function index($name = null) {
        cookie('__forward__', $this->request->url());
        // 数据列表
        $data_list = FileModel::lists($name);
        $this->assign('data_list', $data_list);
        $this->assign('pager', $data_list->render());

        $this->assign('name', $name);
        $this->setMeta('附件管理');
        return $this->fetch();
    }
}